package com.red.star.wechat.data.mappers;

import com.red.star.wechat.data.core.base.MyMapper;
import com.red.star.wechat.data.entity.SettleTaxation;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author nofish.yan@gmail.com
 * @date 2018/6/28.
 * 结算税费数据访问接口
 */
public interface SettleTaxationMapper extends MyMapper<SettleTaxation> {

    /**
     * 根据employeeId计算本导购当月的税费
     *
     * @param employeeId
     * @return
     */
    BigDecimal sumTaxationCharge(@Param("employeeId") Integer employeeId);

    @Select("SELECT settle_id, employee_id, amount_charge FROM t_settle_taxation WHERE settle_id = #{settleId}")
    List<SettleTaxation> listTaxationBySettle(@Param("settleId") Integer settleId);

}
